package com.qf.lw.service.impl;

import com.github.pagehelper.PageHelper;
import com.qf.lw.entity.RoleEntity;
import com.qf.lw.mapper.RoleMapper;
import com.qf.lw.pojo.RolePojo;
import com.qf.lw.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IRoleServiceImpl implements IRoleService {
    @Autowired
    public RoleMapper roleMapper;
    @Override
    public List<RolePojo> queryRoles(RoleEntity roleEntity) {

        if(null!=roleEntity){
            PageHelper.startPage(roleEntity.getPageNum(),roleEntity.getPageSize());
        }
        return roleMapper.queryRoles(roleEntity);
    }
}
